package common;

import bean.wraper.BaseWrapper;
import util.ToastUtil;

/**
 * Created by ilioili on 2015/1/12.
 */
public abstract class HttpCallBack<T extends BaseWrapper> {
    public abstract void onSucceed(T data);

    protected void onNetError() {
        ToastUtil.showShortToast(Constants.MSG_NET_ERROR);
    }

    protected void onServerError(T data) {
        ToastUtil.showLongToast(data.getError().getMessage());
    }
}
